﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Control;
using Model;

namespace WCF
{
    public class MovieService : IMovieService
    {
        private MovieController movCTR;

        public MovieService()
        {
            movCTR = new MovieController();
        }

        public void CreateMovie(string serialNo, string length, string title, string genre, DateTime releaseDate, double ranking)
        {
            movCTR.CreateMovie(serialNo, length, title, genre, releaseDate, ranking);
        }

        public void DeleteMovie(string serialNo)
        {
            movCTR.DeleteMovie(serialNo);
        }

        public List<Movie> FindAllMovies()
        {
            return movCTR.FindAllMovies();
        }

        public Movie FindMovie(string serialNo)
        {
            return movCTR.FindMovie(serialNo);
        }
    }
}
